fix: phantom ledger paths, SQL errors, deterministic case refs - #60
Conversation
Schema Overlord audit findings (6 fixes): - EvidenceFact: entity_type not type, amount_value not value, nullable fields from LEFT JOINs (confidence, verification_status, fact_type) - EvidenceDocument: file_name not filename, created_at not uploaded_at - searchDocuments: GET→POST (ChittyEvidence /search is POST) - getContradictions: pointed to facts?conflicts_only=true (no dedicated contradictions endpoint exists) - timeline.ts: map entity_type→type and amount_value→value for consumers - mcp.ts + litigation.ts: fix a.value→a.amount_value references Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Added 5 evidence tools: get_case_timeline, get_case_facts, get_case_contradictions, get_pending_facts, synthesize_case_facts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add @canon governance annotations to entity_type fields in integrations.ts - Fix MCP JSDoc: "38 tools across 9 domains" → "48 tools across 12 domains" - Add date filtering to deadlines query in MCP get_case_timeline - Add ChittyLedger document fetching to MCP get_case_timeline for REST parity Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…endpoints - CHARTER.md: add ChittyEvidence dependency, timeline/litigation/jobs endpoints, update MCP tool count (28→48), add case timeline and litigation scope items - CHITTY.md: add same endpoints, update MCP tool count (32→48), add ChittyEvidence to direct API data sources Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds missing columns from migrations 0008/0009 to schema.ts: - ccObligations: escalation tracking (5 cols) - ccRecommendations: planner-aware fields (6 cols) - ccEmailConnections + ccUserNamespaces: 2 new tables Also adds drizzle.config.ts and updates drizzle-orm to match drizzle-kit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
|
To use Codex here, create a Codex account and connect to github. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (16)
📝 WalkthroughWalkthroughThis PR adds a complete database schema with migrations, extends the MCP toolkit from 38–43 tools to 48 tools across 12 domains (including a new Evidence domain), introduces REST API endpoints for case timelines/litigation operations/scrape job management, updates type definitions to align with ChittyEvidence API changes, and refreshes documentation to reflect expanded capabilities. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Timeline API
participant ChittyEvidence
participant ChittyLedger
participant Database
Client->>Timeline API: GET /api/v1/timeline/:caseId
Timeline API->>Database: Query facts by caseId
Database-->>Timeline API: Return facts with metadata
Timeline API->>ChittyEvidence: getContradictions(caseId)
ChittyEvidence-->>Timeline API: Return contradictions
Timeline API->>Database: Query legal_deadlines by caseId
Database-->>Timeline API: Return deadlines (optional date filter)
Timeline API->>ChittyLedger: getEvidenceByCase(caseId)
ChittyLedger-->>Timeline API: Return document evidence
Timeline API->>Timeline API: Normalize metadata shapes & flatten<br/>entities/amounts arrays
Timeline API-->>Client: Return unified timeline events<br/>(facts, contradictions, deadlines, documents)
sequenceDiagram
participant Client
participant Litigation API
participant ChittyEvidence
participant ChittyConnect/AI Gateway
participant Database
Client->>Litigation API: POST /api/v1/litigation/synthesize-from-case
Litigation API->>Database: Query case facts, obligations, disputes
Database-->>Litigation API: Return case context
Litigation API->>ChittyEvidence: Fetch evidence facts & amounts
ChittyEvidence-->>Litigation API: Return facts with reshaped<br/>entities (id, entity_type, confidence)<br/>amounts (id, fact_id, amount_value, confidence)
Litigation API->>Litigation API: Synthesize narrative from facts,<br/>obligations, disputes
Litigation API->>ChittyConnect: POST prompt with synthesized facts<br/>(or fallback to AI Gateway)
ChittyConnect-->>Litigation API: Return synthesis response
Litigation API-->>Client: Return synthesized facts JSON
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
/api/evidenceand/api/cases/*ledger paths to correct services (ChittyEvidence, ChittyCommand)ledger_case_idinstead of entry UUIDget_case_timelinetoolTest plan
tsc --noEmitpassesget_case_timelinetool works end-to-end🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation